package com.yangye.springclouddemomqtt.utils;

import java.util.UUID;

/**
 * @author yangye
 * @date 2019/11/4 0004
 */
public class RandomUtil {

	public static String randomString(int length) {
		return UUID.randomUUID().toString().replaceAll("-", "").substring(0, length);
	}

	public static void main(String[] args) {
		System.out.println(randomString(6));
		System.out.println(randomString(6));
		System.out.println(randomString(6));
		System.out.println(randomString(6));
	}
}
